<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/2/13
 * Time: 20:19
 */
namespace app\server;
use rap\db\DB;
use rap\db\Record;

class UserAuth extends Record
{
    public function insertUserAuth($data) {

        $res =DB::insert('mp_user_auth',$data);

        return $res;
    }

    public function getUserAuthInfo ($where, $field) {

        $data = DB::select('mp_user_auth')->where($where)->fields($field)->cache()->find();
        return $data;
    }

    public function updateUserAuth ($where,$data) {

        $sql = DB::update('mp_user_auth');
        foreach ($data as $k => $v) {
            $sql = $sql->set($k, $v);
        }
        $res =$sql->where($where)->excuse();

        return $res;
    }

    public function delUserAuth () {

    }
}